<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>

<h2>Log On</h2>
<c:if test="${empty param.register}">
<p>
    Please enter your user name and password. <a href="register">Register</a> if you don't have an account.
</p>
</c:if>

<script src="/resources/scripts/jquery.validate.min.js" type="text/javascript"></script>
<script src="/resources/scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>



<form action="/j_spring_security_check" method="post">

	<c:if test="${not empty param.login_error}">
		<div
			style="position: relative; color: #FC3131; font-weight: bold; color: #FC3131">
			Your login attempt was not successful.<br /> Reason:
			<c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />
			.
		</div>
		<div>&nbsp;</div>
	</c:if>
	
	<c:if test="${not empty param.register}">
		<div
			style="position: relative; color: #FC3131; font-weight: bold; color: #FC3131">
		<br/>
		You are now Registered ! <br/> 
		Please Log On.
		<br/><br/>
		</div>
	</c:if>
 
	<div>
        <fieldset>
            <legend>Account Information</legend>

            <div class="editor-label">
                <label for="j_username">Email</label>
            </div>
            <div class="editor-field">
                <input data-val="true" data-val-required="The User name field is required." id="j_username" name="j_username" type="text" value="" />
                <span class="field-validation-valid" data-valmsg-for="j_username" data-valmsg-replace="true"></span>
            </div>

            <div class="editor-label">
                <label for="j_password">Password</label>
            </div>
            <div class="editor-field">
                <input data-val="true" data-val-required="The Password field is required." id="j_password" name="j_password" type="password" />
                <span class="field-validation-valid" data-valmsg-for="j_password" data-valmsg-replace="true"></span>
            </div>

            <div class="editor-label">
                <input data-val="true" data-val-required="The Remember me? field is required." id="_spring_security_remember_me" name="_spring_security_remember_me" type="checkbox" value="true" /><input name="_spring_security_remember_me" type="hidden" value="false" />
                <label for="_spring_security_remember_me">Remember me?</label>
            </div>

            <p>
                <input type="submit" value="Log On" />
            </p>
        </fieldset>
    </div>
</form>